/*
package cn.yunhe.insurance.config;

import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;

import java.lang.reflect.Method;

*/
/**
 * redis的配置类
 *//*

public class RedisConfig extends CachingConfigurerSupport {


    */
/**
     * 缓存管理器
     *
     * @param factory
     * @return
     *//*

    @Bean
    public CacheManager cacheManager(RedisConnectionFactory factory) {
        RedisCacheManager redisCacheManager = RedisCacheManager.builder(factory).build();
        return redisCacheManager;

    }

    public KeyGenerator keyGenerator() {
        return new KeyGenerator() {
            @Override
            public Object generate(Object o, Method method, Object... objects) {
                StringBuffer stringBuffer = new StringBuffer();
                stringBuffer.append(o.getClass().getName());
                stringBuffer.append(method.getName());
                for (Object object : objects
                        ) {
                    stringBuffer.append(object.toString());
                }
                return stringBuffer.toString();
            }
        };
    }


}
*/
